<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <ui:composition template="/content/templates/myMenuTemplate.xhtml">
        <ui:param name="selectedMenuSub1" value="adverts"/>
        <ui:define name="title">#{labels['MY_ADVERTS']}</ui:define>
        <ui:decorate template="/content/templates/contentDecorator.xhtml">

            <ui:repeat value="#{viewAdvertsBean.currentUserAdverts}" var="advert">
                <ui:include src="/content/components/previewMyAdvertComponent.xhtml">
                    <ui:param name="advert" value="#{advert}"/>
                </ui:include>
                <div style="height:10px;">&#160;</div>
            </ui:repeat>

            <h:panelGroup rendered="#{viewAdvertsBean.currentUserAdverts.size() gt 0}">
                <ui:include src="/content/panels/advertsNavigationPanel.xhtml">
                    <ui:param name="pageAwareBean" value="#{viewAdvertsBean}"/>
                    <ui:param name="parentPage" value="/content/pages/mymenu/myAdverts.xhtml"/>
                </ui:include>
            </h:panelGroup>
            <h:panelGroup layout="block" rendered="#{viewAdvertsBean.currentUserAdverts.size() eq 0}" style="margin-top:40px;">
                #{labels['NO_ADVERTS_YET']}
            </h:panelGroup>

        </ui:decorate>
    </ui:composition>
</html>